package com.niiwoo.civet.trade.service.cardniu;

import com.niiwoo.civet.trade.dto.common.CardNiuLoanResult;
import com.niiwoo.civet.trade.dto.common.ProjectBorrowerSummaryDTO;
import com.niiwoo.civet.trade.dto.request.cardniu.RepayApplyRequestDTO;
import com.niiwoo.civet.trade.dto.request.cardniu.RepayCalculateRequestDTO;
import com.niiwoo.civet.trade.dto.response.cardniu.RepayApplyResponseDTO;
import com.niiwoo.civet.trade.dto.response.cardniu.RepayCalculateResponseDTO;
import com.niiwoo.civet.trade.dto.response.cardniu.RepayPlanInfo;
import com.niiwoo.civet.trade.dto.response.cardniu.RepayResultDTO;

import java.math.BigDecimal;
import java.util.List;

/**
 * Created by yuanguang on 2018/2/10.
 */
public interface CardNiuRepaymentDubbpService {
    /**
     * 还款试算
     * @param requestDTO
     * @return
     */
    RepayCalculateResponseDTO repayCalculate(RepayCalculateRequestDTO requestDTO);

    /**
     * 还款申请
     * @param requestDTO
     * @return
     */
    @Deprecated
    RepayApplyResponseDTO repayApply(RepayApplyRequestDTO requestDTO);

    /**
     * 还款结果查询
     * @param batchRequestNo
     * @return
     */
    default RepayResultDTO queryRepayResult(String batchRequestNo){
        throw new UnsupportedOperationException("");
    }

    /**
     * 还款结果查询
     * @param orgRequestNo
     * @return
     */
    default RepayResultDTO queryRepayResult(Long projectId, String orgRequestNo){
        throw new UnsupportedOperationException("");
    }
    /**
     * 卡牛还款失败通知需返回数据
     * @param projectId
     * @return
     */
    RepayResultDTO queryRepayResultByProjectId(Long projectId);

    /**
     * 还款计划查询
     * @param projectId
     * @return
     */
    List<RepayPlanInfo> queryRepayPlanInfo(Long projectId);

    /**
     * 查询用户当前标的待还总金额
     * @param projectId
     * @return
     */
    BigDecimal queryShouldRepayAmount(Long projectId);

    /**
     * 查询用户未还期数
     * @param userId
     * @return
     */
    List<Integer> queryShouldRepayPeriods(String userId);

    /**
     * 查询还款摘要信息
     * @param projectId
     * @return
     */
    ProjectBorrowerSummaryDTO projectBorrowerSummary(Long projectId);


    /**
     * 卡牛借款成功后的数据
     * @param projectId
     * @return
     */
    CardNiuLoanResult getLoanAfterSuccess(Long projectId);

}
